package com.xiaozou.util;

import com.alibaba.excel.EasyExcel;
import com.xiaozou.domain.ChatLog;
import com.xiaozou.domain.ExportRow;

import java.util.List;

public class FileUt {

    public static List<ChatLog> readDatasetExcel(String filePath) {
        return EasyExcel.read(filePath)
                .head(ChatLog.class)
                .sheet()
                .doReadSync();
    }

    public static void writeDatasetExcel(List<ExportRow> chatLogs, String filePath) {
        EasyExcel.write(filePath, ExportRow.class)
                .sheet("sheet1")
                .doWrite(chatLogs);
    }


    public static void main(String[] args) {

    }










}
